package org.homebrewn.draggable.components;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.panel.Panel;
import org.odlabs.wiquery.ui.draggable.DraggableAjaxBehavior;
import org.odlabs.wiquery.ui.draggable.DraggableContainment;
import org.odlabs.wiquery.ui.draggable.DraggableContainment.ContainmentEnum;

public class DraggableDivPanel extends Panel{

	/**
	 * Will probably not use serialVersionUIDs
	 */
	private static final long serialVersionUID = -8962199276467993792L;

	public DraggableDivPanel(String id) {
		super(id);

		WebMarkupContainer DraggableDiv = new WebMarkupContainer("draggableDiv");
		
		
		DraggableAjaxBehavior draggableBehaviour = new DraggableAjaxBehavior(){
			@Override
			public void onDrag(Component component,
					AjaxRequestTarget ajaxRequestTarget) {
		
				
			}

			@Override
			public void onStart(Component component,
					AjaxRequestTarget ajaxRequestTarget) {
				// TODO Auto-generated method stub
				
			}

			@Override
			public void onStop(Component draggedComponent,
					AjaxRequestTarget ajaxRequestTarget) {
				// TODO Auto-generated method stub
				
			}
		};
		draggableBehaviour.setContainment(new DraggableContainment(ContainmentEnum.PARENT));
			
		add(DraggableDiv.add(draggableBehaviour));
	}

}
